package com.umakr.demo.controller;

import com.umakr.demo.model.Student;
import com.umakr.demo.service.StudentShowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by yangliu on 2017/8/23.
 */
@Controller
@RequestMapping("/StudentShowController")
public class StudentShowController {

    @Autowired
    StudentShowService studentShowService;

    @RequestMapping("/showStudentInf")
    public String showStudentInf(){
        return "StudentManage/studentinf";
    }

    @RequestMapping("/showStudent")
    @ResponseBody
    public List<Student> srudentInf(Long sid){
        List<Student> list = studentShowService.showStudentInf(sid);
        return list;
    }
}
